<?php
require_once './libraries/common.inc.php'; $print_view = true; require_once './libraries/header.inc.php'; PMA_checkParameters(array('db')); $err_url = 'db_sql.php?' . PMA_generate_common_url($db); require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); $tables = PMA_DBI_get_tables_full($db); $num_tables = count($tables); echo '<br />'; if ($num_tables == 0) { echo $strNoTablesFound; } else { ?>
<table>
<thead>
<tr>
<th><?php echo $strTable; ?></th>
<th><?php echo $strRecords; ?></th>
<th><?php echo $strType; ?></th>
<?php
if ($cfg['ShowStats']) { echo '<th>' . $strSize . '</th>'; } ?>
<th><?php echo $strComments; ?></th>
</tr>
</thead>
<tbody>
<?php
$sum_entries = $sum_size = 0; $odd_row = true; foreach ($tables as $sts_data) { if (strtoupper($sts_data['ENGINE']) == 'MRG_MYISAM' || strtoupper($sts_data['ENGINE']) == 'FEDERATED') { $merged_size = true; } else { $merged_size = false; } $sum_entries += $sts_data['TABLE_ROWS']; ?>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
<th>
<?php echo htmlspecialchars($sts_data['TABLE_NAME']); ?>
</th>
<?php
if (isset($sts_data['TABLE_ROWS'])) { ?>
<td align="right">
<?php
if ($merged_size) { echo '<i>' . PMA_formatNumber($sts_data['TABLE_ROWS'], 0) . '</i>' . "\n"; } else { echo PMA_formatNumber($sts_data['TABLE_ROWS'], 0) . "\n"; } ?>
</td>
<td nowrap="nowrap">
<?php echo $sts_data['ENGINE']; ?>
</td>
<?php
if ($cfg['ShowStats']) { $tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $sum_size += $tblsize; list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, 1); ?>
<td align="right" nowrap="nowrap">
<?php echo $formated_size . ' ' . $unit; ?>
</td>
<?php
} } else { ?>
<td colspan="3" align="center">
<?php echo $strInUse; ?>
</td>
<?php
} ?>
<td>
<?php
if (! empty($sts_data['Comment'])) { echo htmlspecialchars($sts_data['Comment']); $needs_break = '<br />'; } else { $needs_break = ''; } if (! empty($sts_data['Create_time']) || ! empty($sts_data['Update_time']) || ! empty($sts_data['Check_time'])) { echo $needs_break; ?>
<table width="100%">
<?php
if (! empty($sts_data['Create_time'])) { ?>
<tr>
<td align="right"><?php echo $strStatCreateTime . ': '; ?></td>
<td align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Create_time'])); ?></td>
</tr>
<?php
} if (! empty($sts_data['Update_time'])) { ?>
<tr>
<td align="right"><?php echo $strStatUpdateTime . ': '; ?></td>
<td align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Update_time'])); ?></td>
</tr>
<?php
} if (! empty($sts_data['Check_time'])) { ?>
<tr>
<td align="right"><?php echo $strStatCheckTime . ': '; ?></td>
<td align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Check_time'])); ?></td>
</tr>
<?php
} ?>
</table>
<?php
} ?>
</td>
</tr>
<?php
} ?>
<tr>
<th align="center">
<?php echo sprintf($strTables, PMA_formatNumber($num_tables, 0)); ?>
</th>
<th align="right" nowrap="nowrap">
<?php echo PMA_formatNumber($sum_entries, 0); ?>
</th>
<th align="center">
--
</th>
<?php
if ($cfg['ShowStats']) { list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1); ?>
<th align="right" nowrap="nowrap">
<?php echo $sum_formated . ' ' . $unit; ?>
</th>
<?php
} ?>
<th>&nbsp;</th>
</tr>
</tbody>
</table>
<?php
} ?>
<script type="text/javascript">
//<![CDATA[
function printPage()
{
// Do print the page
if (typeof(window.print) != 'undefined') {
window.print();
}
}
//]]>
</script>
<br /><br />
<input type="button" class="print_ignore"
id="print" value="<?php echo $strPrint; ?>" onclick="printPage()" />
<?php
require_once './libraries/footer.inc.php'; ?>
